﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanmia.Core;

namespace Tanmia.NHibernate.Mapping
{
    public class TransferNoteMap : BaseNoteMap<TransferNote>
    {
        public TransferNoteMap()
        {
            Table("TransferNote");

            Id(x => x.TransferNoteID).Nullable().GeneratedBy.Identity();

            HasMany(x => x.Details).KeyColumn("TransferNoteID").Cascade.SaveUpdate();

            References(x => x.ToRepository, "ToRepositoryID").Not.Nullable();
        }
    }
}
